package com.fishingwithme.domain.settings;

// src/main/java/com/example/feedback/service/impl/FeedbackServiceImpl.java

import com.fishingwithme.infrastructure.mapper.FeedbackMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FeedbackServiceImpl implements FeedbackService {

    @Autowired
    private FeedbackMapper feedbackMapper;

    @Override
    public int createFeedback(Feedback feedback) {
        return feedbackMapper.insert(feedback);
    }

    @Override
    public Feedback getFeedbackById(Long id) {
        return feedbackMapper.selectById(id);
    }

    @Override
    public List<Feedback> getAllFeedbacks() {
        return feedbackMapper.selectAll();
    }

    @Override
    public int updateFeedback(Feedback feedback) {
        return feedbackMapper.updateById(feedback);
    }

    @Override
    public int deleteFeedback(Long id) {
        return feedbackMapper.deleteById(id);
    }
}
